"""整个游戏的配置项"""


class Settings:
    def __init__(self):
        self.screen_width = 1200
        self.screen_height = 800
        self.bg_color = (230, 230, 230)

        self.ship_limit = 3;

        # 子弹大小和颜色

        self.bullet_width = 10;
        self.bullet_height = 100;
        self.bullet_color = 255, 60, 60
        self.bullet_allowed = 3

        # 外星人,direction=1 表示右移,-1表示左移

        self.feet_drop_factor = 10;
        self.feet_direction = 1;
        self.alien_points = 10;

        #以什么样的速度加快游戏节奏
        self.speedup_scale = 1.1;
        self.scale_score = 2;
        self.initialize_dynamic_settings();

    def initialize_dynamic_settings(self):

        self.ship_speed_factor = 1.5;
        self.bullet_speed_factor = 3;
        self.alien_speed_factor = 1;

    def increase_speed(self):
        self.ship_speed_factor *= self.speedup_scale;
        self.bullet_speed_factor *= self.speedup_scale;
        self.alien_speed_factor *= self.speedup_scale;
        self.feet_drop_factor *= self.speedup_scale;
        self.alien_points *= self.speedup_scale;